package com.yixing.tech.entity.service;

import com.yixing.tech.common.base.BusinessException;
import com.yixing.tech.common.base.ConditionsVO;
import com.yixing.tech.entity.entity.CustomActionParam;
import com.yixing.tech.entity.po.EntityData;
import com.yixing.tech.common.vo.s3.UserVO;
import com.yixing.tech.common.vo.s5.EntitiesVO;
import com.yixing.tech.common.vo.s5.EntityVO;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * @author yixing tech
 */
public interface IEntityService {

    String insert(EntityVO vo) throws BusinessException;

    void batchInsert(EntitiesVO vo) throws BusinessException;

    void update(EntityVO vo) throws BusinessException;

    void remove(EntityVO vo) throws BusinessException;

    /**
     * 导出成品入库单明细
     */
    void exportProdDetail(HttpServletResponse response, String prodInStockId)throws BusinessException;

    /**
     * 单箱成品入库明细导出
     */
    void singleExportProdDetail(HttpServletResponse response, String prodInStockId)throws BusinessException;

    /**
     * 根据入库单生成返工领料单
     */
    void buildBomRQOrderByProdInStockId(String prodInStockId, UserVO userVO)throws BusinessException;


    /**
     * 包装管制
     * @param cartonNo 外箱号
     * */
    public void packControl(String cartonNo) throws BusinessException;

    /**
     * 获取剩余可领料数,硅片
     * @param planId 计划单id
     * */
    public double getLeftLYNums(String planId) throws BusinessException;
    /**
     * 获取剩余可领料数
     * @param planId 计划单id
     * */
    public void getLeftLYNums(String planId, List<Map> list) throws BusinessException;
    /**
     * 获取剩余可领料数
     * @param planId 计划单id
     * */
    public void getLeftLYNumsByType(String planId, List<Map> list) throws BusinessException;
    /**
     * 获取剩余可入库数
     * @param orderId 生产订单id
     * */
    public double getLeftRKNums(String orderId) throws BusinessException;

    /**
     * 获取已下发物料数量（硅片  网版 浆料）
     * @param  orderNo 工单号
     */
    Map<String,Double> getInLineNum(String orderNo) throws BusinessException;

    /**
     * 成品入库数
     */
    Double getInProductWareHouseNum(String orderId) throws BusinessException;

    /**
     * 碎片入库数
     */
    Double getInFragmentWareHouseNum(String orderId) throws BusinessException;

    public void cancelGraphiteBoat(String objectId,String tableId,String entityId) throws BusinessException;

    public void clearAlarm(String objectId,String entityId) throws BusinessException;

    /**
     * 线别冲突
     */
    public void lineConflict(String objectId, EntityData entity) throws BusinessException;

    Map lookOrderSummary(CustomActionParam param)  throws BusinessException;
}
